val open_globalenv : Ast.typing list -> unit
val open_localenv : Ast.typing list -> unit
val close_localenv : unit -> unit (* MP has only one level *)
val declare_fun : Ast.sorting -> unit
val define_fun :  Ast.sorting -> unit
val declare_record : string * Ast.decl -> unit

val ident_type : string -> Ast.mptype 
val fun_sort : string -> Ast.mpsort
val fun_delcared : string -> bool
val fun_defined : string -> bool
val record_declared : string -> bool
val fields_sort : string -> Ast.decl
val field_sort : string -> string -> Ast.mptype
val field_index : string -> string -> int
